package com.mlxg.config.oss;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;

/**
 * 项目属性配置
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "client", ignoreInvalidFields = true)
public class ExhibitorAppConfig {

    private String id;
    @Resource
    @ApiModelProperty("阿里云的OSS配置")
    private AliyunOssConfig aliyunOss;

    @Data
    @Configuration
    @ApiModel("阿里云")
    public static class AliyunOssConfig {
        @ApiModelProperty("创建Bucket时所在区域的结点")
        private String endpoint;

        @ApiModelProperty("accessKeyId")
        private String accessKeyId;

        @ApiModelProperty("accessKeySecret")
        private String accessKeySecret;

        @ApiModelProperty("Bucket名字")
        private String bucketName;
    }


}
